﻿<style type="text/css">
    .popover {
        outline: none;
    }
</style>
<div ng-controller="formDevPlanCtrl">
    <table class="table table-bordered table-hover tlist">
        <thead>
        <tr>
            <td colspan="8" style="text-align:center; background-color:#f5f5f5">
                <span style="color:black;"><strong>{{title}}</strong></span>
                <span>
                        <button type="button" class="btn btn-link"
                                style="float:right;margin-right:3%; color:#007bff;padding:1px;" data-placement="center"
                                data-animation="am-fade-and-scale" ng-click="sendToSenior()"
                                ng-hide="formdata.params.readonly||formdata.ft!=1"><strong>发起任务</strong></button>
                        <button type="button" class="btn btn-link"
                                style="float:right;margin-right:2%; color:#007bff;padding:1px;" data-placement="center"
                                data-animation="am-fade-and-scale" ng-click="sendToJunior()"
                                ng-hide="formdata.params.readonly||formdata.ft!=3"><strong>一键派发</strong></button>
                    </span>
            </td>
        </tr>
        <tr style="background-color:#f0f8ff">
            <th>系统</th>
            <th>功能点</th>
            <th>任务名称</th>
            <!--<th>任务描述</th>-->
            <th>责任人</th>
            <th>预计完成时间</th>
            <th>预计工作量</th>
            <th>状态</th>
            <th ng-hide="formdata.ft==2">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="it in items">
            <td>{{it.SystemName}}</td>
            <td>{{it.SysDutyName}}</td>
            <td class="col-md-4" ng-if="it.TaskNote!=null">
                <div id="note" data-placement="top" bs-popover data-content="{{it.TaskNote}}" data-title="任务描述"
                     data-trigger="hover">{{it.TaskName}}
                </div>
            </td>
            <td class="col-md-4" ng-if="it.TaskNote==null">
                <div id="note">{{it.TaskName}}</div>
            </td>
            <!--<td style="width:15%"><div id="note" style='display:-webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;overflow:hidden;'data-placement="top"  bs-popover data-content="{{it.TaskNote}}" data-title="任务描述" data-trigger="hover">{{it.TaskNote}}</div></td>-->
            <td>{{it.UserName}}</td>
            <td class="col-md-2">{{it.ExpectFinishDate}}</td>
            <td>{{it.ExpectWorkValue}}</td>
            <td ng-if="it.DevState==0&&formdata.ft<3">未制定</td>
            <td ng-if="it.DevState==1&&formdata.ft<3">已制定</td>
            <td ng-if="it.DevState==1&&formdata.ft==3">未派送</td>
            <td ng-if="it.DevState==2">已派送</td>
            <td ng-if="it.DevState==3">已完成</td>
            <td ng-hide="formdata.ft==2">
                <button ng-if="it.DevState<2&&formdata.ft==1&&!formdata.params.readonly" class="btn btn-success btn-sm"
                        title="修改" ng-click="showmodal(it)">
                    <span class="glyphicon glyphicon-pencil "></span>
                </button>
                <button ng-if="it.DevState==2" class="btn btn-success btn-sm" title="已派送" ng-click="check(it)">
                    <span class="glyphicon glyphicon-send"></span>
                </button>
                <button ng-if="it.DevState<2&&formdata.ft>1" class="btn btn-danger btn-sm" title="待派送"
                        disabled="disabled">
                    <span class="glyphicon glyphicon-send"></span>
                </button>
                <button ng-if="it.DevState==3" class="btn btn-success btn-sm" title="已完成" ng-click="check(it)">
                    <span class="glyphicon glyphicon-ok"></span>
                </button>
            </td>
            <!--<td ng-if="formdata.params.readonly">
                <button ng-if="it.DevState==3" class="btn btn-success btn-sm" title="已完成">
                    <span class="glyphicon glyphicon-ok"></span>
                </button>
            </td>-->
        </tr>
        <tr ng-if="items.length<=0">
            <td colspan="{{formdata.params.readonly?8:9}}" style="text-align:center">暂无数据</td>
        </tr>
        </tbody>
    </table>
    <pagination ng-if="formdata.finddata.total>formdata.finddata.pagesize" data-pageindex="formdata.finddata.pageindex"
                data-pagesize="formdata.finddata.pagesize" data-ptotal="formdata.finddata.total"></pagination>
</div>
